﻿using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace SistemaAdministracion.Models.BaseClass
{
    [Table("empresa",Schema="empresa")]
    public class Empresa
    {

        public Empresa()
        {
            this.DireccionEmpresa = new HashSet<DireccionEmpresa>();
            this.TelefonoEmpresa = new HashSet<TelefonoEmpresa>();
            this.RepLegal = new HashSet<RepLegal>();
            this.FichaEmpleado = new HashSet<FichaEmpleado>();
            this.Mutual = new HashSet<Mutual>();
            this.CajaCompensacion = new HashSet<CajaCompensacion>();
        }

        [Column("idempresa")]
        public int IdEmpresa { get; set; }
        [Column("rut")]
        public int RUT { get; set; }
        [Column("dv")]
        public char DV { get; set; }
        [Column("razonsocial")]
        public string RazonSocial { get; set; }
        [Column("nombrefantasia")]
        public string NombreFantasia { get; set; }
        [Column("finicioactividades")]
        public DateTime FInicioActividades { get; set; }
        [Column("rubro")]
        public string Rubro { get; set; }
        [Column("giro")]
        public string Giro { get; set; }
        [Column("vigencia")]
        public int Vigencia { get; set; }
        [Column("nombres")]
        public string Nombres { get; set; }
        [Column("appaterno")]
        public string ApPaterno { get; set; }
        [Column("apmaterno")]
        public string ApMaterno { get; set; }

        public virtual ICollection<TelefonoEmpresa> TelefonoEmpresa { get; set; }
        public virtual ICollection<DireccionEmpresa> DireccionEmpresa { get; set; }
        public virtual ICollection<RepLegal> RepLegal { get; set; }
        public virtual ICollection<FichaEmpleado> FichaEmpleado { get; set; }
        public virtual ICollection<Mutual> Mutual { get; set; }
        public virtual ICollection<CajaCompensacion> CajaCompensacion { get; set; }
    }
}
